import Vue from 'vue'
import VueRouter from 'vue-router'
import { backstageRoutes } from './modules/backstage'
import { screenRoutes } from './modules/screen'
Vue.use(VueRouter)

export const constantRoutes = [
  {
    path: '/',
    redirect: to => {
      return '/screen/index'
    },
    hidden: true
  },
  {
    path: '/login',
    meta: {
      title: '登录'
    },
    hidden: true,
    component: () => import('@/views/login/index.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    ...constantRoutes,
    ...backstageRoutes,
    ...screenRoutes
  ]
})
export default router
